package com.smartalarmclock.Model.Exceptions;

@SuppressWarnings("serial")
public final class InvalidNullReferenceOnDeleteException extends InvalidDeleteDataEntityOperationException {
	
	/**
	 * Constructor
	 * @param referencingType the type of the referencing data entity
	 * @param referencingId the id of the referencing data entity
	 * @param referencedType the type of the referenced data entity
	 * @param referencedId the id of the referenced data entity
	 */
	public InvalidNullReferenceOnDeleteException(Class<?> referencingType, int referencingId, Class<?> referencedType, int referencedId) {
		super(String.format("Could not remove reference of type %s with the id %d from type %s with the id %d.",
			referencedType.getSimpleName(),
			referencedId,
			referencingType.getSimpleName(),
			referencingId));
	}
}
